package com.m3958.firstgwt.server.utils;

import java.util.ArrayList;
import java.util.List;

import com.m3958.firstgwt.server.model.BaseTreeModel;
import com.m3958.firstgwt.server.types.TreeModel;

public class TreeModelUtil {

	public <T extends BaseTreeModel<T>> List<T> getSiblings(TreeModel<T> tm){
		if(tm.getParent()!=null){
			return (List<T>) tm.getParent().getChildren();
		}
		return new ArrayList<T>();
	}
}
